<?php

?>
<ol class="breadcrumb">
    <li><a href="<?php echo $template->url->getLink('admin/menu');?>">Menu</a></li>
    <li class="active"><a href="<?php echo $template->url->getLink('admin/menu/add');?>">Add</a></li>
</ol>

<form action="" role="form" method="POST">
    <div class="panel panel-primary">
        <div class="panel-heading">Thêm mới Menu</div>
        <div class="panel-body">
            <div class="form-group">
                <label>Title</label>
                <input type="text" name="val[title]" class="form-control">    
            </div>

            <div class="form-group">
                <label>URL</label>
                <input type="text" name="val[url]" class="form-control">    
            </div>

            <div class="form-group">
                <?php if($template->get('aMenus')) : ?>
                    <select class="form-control" name="val[parent_menu_id]">
                        <option value="0">Menu cha</option>
                        <?php foreach($template->get('aMenus') as $oMenu) : ?>
                            <option value="<?php echo $oMenu->menu_id; ?>"><?php echo $oMenu->title; ?></option>
                            <?php endforeach; ?>
                    </select>
                    <?php endif; ?>
            </div>
            <button type="submit" class="btn btn-primary">Submit</button>
        </div>
    </div>
</form>